//
//  CommonUtil.h
//  SinaWebo
//
//  Created by 亦心 on 15/4/6.
//  Copyright (c) 2015年 亦心. All rights reserved.
//

#ifndef SinaWebo_CommonUtil_h
#define SinaWebo_CommonUtil_h

#define SCREEN_PORTRAIT_WIDTH   ([UIScreen mainScreen].bounds.size.width < [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.width : [UIScreen mainScreen].bounds.size.height)
#define SCREEN_PORTRAIT_HEIGHT  ([UIScreen mainScreen].bounds.size.width > [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.width : [UIScreen mainScreen].bounds.size.height)


// 用户登录相关
#define kAppKey @"3590585050"
#define kAppSecret @"bef7ff85a218d8c92767c740a09487f5"
#define kRedirectURI @"http://open.weibo.com/"
#define kHost        @"https://api.weibo.cn"
#define LoginURL [NSString stringWithFormat:@"https://api.weibo.com/oauth2/authorize?client_id=%@&redirect_uri=%@", kAppKey, kRedirectURI]

#define kMeURL       @"http://api.weibo.cn/2/page?gsid=_2A256Zs_LDeRxGeNL7lMX-C3FyjyIHXVXMkQDrDV6PUJbrdANLWnVkWpJyE4vVPGdEKqAMcIfHqppZc7ORg..&b=1&from=1066093010&c=iphone&v_p=31&skin=default&s=392e5974"



//屏幕宽度
#define kScreenW [UIScreen mainScreen].bounds.size.width
//屏幕高度
#define kScreenH [UIScreen mainScreen].bounds.size.height

//获得RGB颜色
#define MyColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define MyColorA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]

//微博用户昵称的字体
#define StatusFrameNameLabelFont [UIFont systemFontOfSize:17]
//微博正文字体
#define StatusFrameTextLabelFont [UIFont systemFontOfSize:17]
//转发微博正文字体
#define StatusFrameRewTextLabelFont [UIFont systemFontOfSize:16]
//微博来源和时间的字体
#define StatusFrameTimeLabelFont [UIFont systemFontOfSize:12]
//CardTitle字体
#define CardTitleLabelFont [UIFont systemFontOfSize:17]

//通知
#define FWTabBarDidSelectNotification @"BarDidSelectNotification"


//微博图片的间距
#define StatusHeaderTop 15
#define StatusFrameMargin 10
#define StatusTimeTop 5
//微博之间的间距
#define kCellMargin 0

//微博图片的设置
#define kPhotoH (kScreenW / 3-10)    //图片高度
#define kPhotoW kPhotoH     //图片宽度
#define kMargin 4       //图片之间的间距
#define kPeopleWH 40    //用户图标
#define kVip 10         //vip 图标
#define kVerified 14    //认证图标

#define kWBLinkHrefName     @"href" //NSString
#define kWBLinkURLName      @"url" //WBURL
#define kWBLinkTagName      @"tag" //WBTag
#define kWBLinkTopicName    @"topic" //WBTopic
#define kWBLinkAtName       @"at" //NSString

//导航栏文字大小
#define NavigationTextSize 15
#define NavigationCenterTextSize 19


// 3.自定义Log
#ifdef DEBUG
#define MyLog(...) NSLog(__VA_ARGS__)
#else
#define MyLog(...)
#endif

#import "HttpURL.h"
#import "DCURLRouter.h"
#import "HttpURLConst.h"
#import "UIView+Extension.h"
#endif
